package com.hiwhitley.easy.day08;

import com.hiwhitley.base.ListNode;

/**
 * Created by hiwhitley on 2016/8/12.
 */
public class DeleteNode {
    public void deleteNode(ListNode node) {
        if(node == null) {
            return;
        }
        if(node.next == null) {
            node = null;
            return;
        }

        node.val = node.next.val;
        node.next = node.next.next;
    }
}
